package aiku.numericalcontroloa.common.base;

import lombok.Data;

import java.io.Serializable;

/**
 * controller返回值类型
 * @param <T>
 */
@Data
public class Result<T> implements Serializable {

    /**
     * 返回处理消息
     */
    private String message;
    /**
     * 状态码
     */
    private Integer code;
    /**
     * 成功标志
     */
    private boolean status;
    /**
     * 返回数据对象
     */
    private T data;


    public Result() {

    }

    public Result(boolean status, T data, int code, String message) {
        this.status = status;
        this.data = data;
        this.code = code;
        this.message = message;
    }

    public Result(boolean status, int code, String message) {
        this.status = status;
        this.code = code;
        this.message = message;
    }

}
